$OpenBSD: patch-st_c,v 1.3 2017/04/05 21:29:57 juanfra Exp $
--- st.c.orig	Thu Aug 11 16:25:58 2016
+++ st.c	Wed Mar 29 14:20:44 2017
@@ -1454,9 +1454,15 @@ ttynew(void)
 			die("ioctl TIOCSCTTY failed: %s\n", strerror(errno));
 		close(s);
 		close(m);
+
+		if (pledge("stdio getpw proc exec", NULL) == -1)
+			die("pledge\n");
+
 		execsh();
 		break;
 	default:
+		if (pledge("stdio rpath tty", NULL) == -1)
+			die("pledge\n");
 		close(s);
 		cmdfd = m;
 		signal(SIGCHLD, sigchld);
